home *** CD-ROM | disk | FTP | other *** search
/ PC-X 1997 October / pcx14_9710.iso / swag / delphi.swg / 0007_How to use a custom cursor.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-11-22  |  670 b   |  24 lines

  1.  
  2. Q:  How do I use one of the cursor files in the c:\delphi\images\cursors?
  3.  
  4. A:  Use the image editor to load the cursor into a RES file.
  5.     The following example assumes that you saved the cursor in the RES file
  6.     as "cursor_1", and you save the RES file as MYFILE.RES.
  7.     
  8. (*** BEGIN CODE ***)
  9. {$R c:\programs\delphi\MyFile.res}   { This is your RES file }
  10.  
  11. const PutTheCursorHere_Dude = 1;     { arbitrary positive number }
  12.  
  13. procedure stuff;
  14. begin
  15.   screen.cursors[PutTheCursorHere_Dude] := LoadCursor(hInstance, 
  16.  
  17.                                                       PChar('cursor_1'));
  18.   screen.cursor := PutTheCursorHere_Dude;
  19. end;
  20.  
  21.  
  22.  
  23.  
  24.